package com.learn.project2.controller.wx.footprint;

import com.learn.project2.model.vo.wx.footprint.FootprintListVO;
import com.learn.project2.service.admin.footprint.FootprintService;
import com.learn.project2.service.wx.footprint.FootprintService2;
import com.learn.project2.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @description:
 * @author zhizhuke
 * @date 2022-01-08 17-44
 * @version 1.0
 */
@RestController
@RequestMapping("wx/footprint")
public class FootprintController2 {

    @Autowired
    FootprintService2 footprintService2;

    /** 
     * @description: 
     * @param:  
     * @return:  
     * @author zhizhuke
     * @date: 2022-01-11 08:43
     */ 
    @RequestMapping("list")
    public Result list(Integer page,Integer limit){
      FootprintListVO footprintListVO =  footprintService2.list(page,limit);
        return Result.ok(footprintListVO);
    }
    /** 
     * @description: 
     * @param:  
     * @return:  
     * @author zhizhuke
     * @date: 2022-01-11 08:45
     */ 
    @RequestMapping("delete")
    public Result delete(@RequestBody Map map){
        Integer id = (Integer) map.get("id");
        footprintService2.delete(id);
        return Result.ok();
    }
}
